<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@include file="../mytags.jsp"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport"
	content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
<title>个人中心</title>
<script>
	mui.init();
	//首页返回键处理
	//处理逻辑：1秒内，连续两次按返回键，则退出应用；
	var first = null;
	var showMenu = false;
	mui.back = function() {
		if (showMenu) {
			closeMenu();
		} else {
			//首次按键，提示‘再按一次退出应用’
			if (!first) {
				first = new Date().getTime();
				mui.toast('再按一次退出应用');
				setTimeout(function() {
					first = null;
				}, 1000);
			} else {
				if (new Date().getTime() - first < 1000) {
					plus.runtime.quit();
				}
			}
		}
	};
    var authLevel = '${user.authenticationLevel}';
    function goTo(url) {
        if(authLevel == "2"){
            location.href = url;
            return;
        }else if(authLevel == "1"){
            mui.confirm("您还没有认证钻石会员，现在认证？", '提示', ['取消', '确认'], function(e) {
                if (e.index == 1) {
                    window.location.href="loginWxController.do?goUserBind";
                    return;
                }
            })
        }else if(authLevel=="3"){
            mui.alert("您的钻石会员认证正在审批中，请耐心等待");
            return;
        }
    }
</script>
</head>
<body>
	<div class="ba">
		<div class="ba1">
			<a href="loginWxController.do?goUserInfo"><img style="border-radius:100px;" src="${user.wxHeadImgUrl }">
				<h3>${contacts.name }</h3></a>
			<c:if test="${user.authenticationLevel eq '1' ||user.authenticationLevel eq '3'}">
				<img src="${webRoot }images/yinpai.png" style="height: 20px; display: block; margin: 18px auto; ">
			</c:if>

			<c:if test="${user.authenticationLevel eq '2'}">
				<img src="${webRoot }images/jinpai.png" style="height: 20px; display: block; margin: 18px auto;">
			</c:if>
			<%--<img src="${webRoot }images/huang.png" style="height: 20px; display: block; margin: 0 auto; margin-top: 10px;">--%>
			<%--<img src="${webRoot }images/jinpai.png" style="height: 20px; display: block; margin: 0 auto; margin-top: 10px;">--%>
			<%--<img src="${webRoot }images/yinpai.png" style="height: 20px; display: block; margin: 0 auto; margin-top: 10px;">--%>
				<%--<img src="${webRoot }images/px.png" style="height: 8px;">--%>
		</div>
		<div class="ba2">
			<c:if test="${user.authenticationLevel eq '2'}">
				${contacts.belongCinema.name }
			</c:if>
		</div>
	</div>
	<div class="set1" style="margin-top:0px;">
		<ul class="mui-table-view">
			<li class="mui-table-view-cell"><a
				class="mui-navigate-right set_im" href="loginWxController.do?goPersionalCenterServiceMenu"> <img
					src="${webRoot }images/ger1.png"> 我的服务单
			</a></li>
			<li class="mui-table-view-cell" style="margin-top: 0;"><a
				class="mui-navigate-right set_im" onclick="goTo('cbsWxUserCenterController.do?userEquipList')"> <img
					src="${webRoot }images/ger2.png"> 我的设备
			</a>
            </li><li class="mui-table-view-cell" style="margin-top: 0;"><a
				class="mui-navigate-right set_im" onclick="goTo('zyContactsController.do?goWxContactsList')"> <img
					src="${webRoot }images/toux.png"> 我的同事
			</a></li>
<!-- 			<li class="mui-table-view-cell" style="margin-top: 0;"><a -->
<!-- 				class="mui-navigate-right set_im" href="message.html"> <img -->
<%-- 					src="${webRoot }images/ger3.png"> 我的优惠券 --%>
<!-- 			</a></li> -->
            <li class="mui-table-view-cell">
                <c:choose>
                    <c:when test="${user.authenticationLevel ne '2' && user.authenticationLevel ne '3' && isbind ne 'true'}">
                        <a class="mui-navigate-right set_im" href="loginWxController.do?goVipExplain">
                            <img src="${webRoot }images/ger4.png"> 申请会员认证
                        </a>

                    </c:when>
                    <c:otherwise>
                        <a class="mui-navigate-right set_im" href="loginWxController.do?goAuthInfo">
                            <img src="${webRoot }images/ger4.png"> 我的会员认证
                        </a>
                    </c:otherwise>
                </c:choose>

            </li>
		</ul>
	</div>
		<%--<div class="mui-clearfix"></div>
		<div class="set1"
			style="margin-top: 10px; padding-top: 0; border-top: none">
			<ul class="mui-table-view">

			</ul>
		</div>--%>
</body>
</html>